package com.xinzhang;

import java.util.List;
import com.asy.ui.base.UploadListAdapter;
import com.helper.SqlLiteHepler;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.ListView;

public class uploadlist extends Activity implements OnClickListener {

	private ListView listView;
	private ImageView imageView;
	
	public void onClick(View v) {
		// TODO Auto-generated method stub
		if(v.getId()==R.id.dbtnback)
		{
			finish();
		}
	}
	protected void UiInit() {
		listView=(ListView)findViewById(R.id.uploadlistview);
		imageView=(ImageView)findViewById(R.id.dbtnback);
		imageView.setOnClickListener(this);
	}
	
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.uploadlist);
		UiInit();
		ListLoad();
	}

	protected void ListLoad() {
		SqlLiteHepler sqlLiteHepler=new SqlLiteHepler(this);
		List<String> list= sqlLiteHepler.GetUploadFiles();
		sqlLiteHepler.Close();
		UploadListAdapter uploadListAdapter=new UploadListAdapter(this,list,listView);
		listView.setAdapter(uploadListAdapter);
	}
	
	
}
